﻿namespace Harness.Recording.LocateParsers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using mshtml;

    internal class LabelLocateParseBehavior : LocateParser.ILocateParseBehavior
    {
        public string Parse(IHTMLElement element)
        {
            IHTMLLabelElement label = element as IHTMLLabelElement;

            if (null == label)
            {
                return string.Empty;
            }

            return string.Format("label={0}", element.innerText.Trim());
        }
    }
}
